
let BASE_URL: string
const API_PREFIX = '/api/v1'

if (process.env.NODE_ENV === 'development') {
  BASE_URL = 'http://localhost:9713'
} else {
  // for prod
  BASE_URL = 'https://www.dypi.xyz'

  // for online dev
  // BASE_URL = 'http://dev.dypi.xyz'
}

const URL_PAT = /http[s]?:\/\/114.115.210.135/g
const PORT_PAT = /:8081/g
const IMG_HOST = 'https://dypi.xyz'

const CDN = 'https://www.dypi.xyz/npm/vditor-3.8.14'

const IMAGE_URL = BASE_URL + API_PREFIX

export { BASE_URL, API_PREFIX, IMAGE_URL, URL_PAT, IMG_HOST, PORT_PAT, CDN }
